
enum Command {
    /**
     * 复位打印机
     */
    RESET(new byte[]{0x1b, 0x40}),
    /**
     * 加粗
     */
    toLarge2(new byte[]{0x1B, 0x45, 0x01}),
    /**
     * 加大1倍
     */
    toLarge(new byte[]{0x1D, 0x21, 0x01}),
    /**
     * 切纸
     */
    CUT_PAPER(new byte[]{0x1D, 0x56, 1}),
    /**
     * 蜂鸣
     */
    BUZZING(new byte[]{0x1B, 0x42, 2, 6}),
    /**
     * 水平居中
     */
    ALINE_CENTER(new byte[]{0x1B, 0x61, 1}),
    /**
     * 左对齐
     */
    ALINE_LEFT(new byte[]{0x1B, 0x61, 0}),
    /**
     * 右对齐
     */
    ALINE_RIGHT(new byte[]{0x1B, 0x61, 2}),
    /**
     * 行间距
     */
    LINE_HEIGHT_DEFAULT(new byte[]{0x1B, 0x32}),
    /**
     * 横向跳格
     */
    SKIP_SPACE(new byte[]{0x1B, 0x44, 16, 20, 24, 28});

    Command(byte[] commandBytes) {
        this.commandBytes = commandBytes;
    }

    private byte[] commandBytes;

    public byte[] getCommandBytes() {
        return commandBytes;
    }
}

